<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1 {
            width: 300px;
            height: 300px;
            background-color: red;
        }
        
        .box2 {
            width: 300px;
            /* 暂时不设置高度 */
            /* height: 300px; */
            background-color: blue;
            float: left;
        }
        /* 伪元素选择器  将内容删除 内容是‘’ 设置成一个块 */
        
        .box2::after {
            clear: both;
            content: '';
            display: block;
        }
        
        .box3 {
            width: 300px;
            height: 300px;
            background-color: green;
        }
        
        .left {
            width: 70px;
            height: 70px;
            background-color: hotpink;
            float: left;
        }
        
        .right {
            width: 70px;
            height: 70px;
            background-color: purple;
            float: left;
        }
    </style>
</head>

<body>
    <div class="box1"></div>
    <div class="box2">
        <div class="left">左边盒子</div>
        <div class="right">右边盒子</div>
    </div>
    <div class="box3"></div>

</body>

</html>